@isTest
public with sharing class Test_NA_NotificationHistory
{
	public static testMethod void testHistoryNotificationRequest() 
	{
		NA_NotificationHistory.nfInputs nfInputItem = new NA_NotificationHistory.nfInputs();
		nfInputItem.RowId = 1;
		nfInputItem.Kind = '1';
		
		String strTxt = '';
strTxt += '<fsnotification version="1.0" >'; 
strTxt += '    <order> ';
strTxt += '        <date>2011-06-12 15:18:43</date>'; 
strTxt += '        <reference>INT110612-5632-14398</reference>'; 
strTxt += '        <test>true</test> ';
strTxt += '        <ip>88.162.188.218</ip>'; 
strTxt += '        <referrer></referrer> ';
strTxt += '        <currency>EUR</currency>'; 
strTxt += '        <tax>8.92</tax> ';
strTxt += '        <total>110.67</total>'; 
strTxt += '        <subtotal>101.75</subtotal>'; 
strTxt += '        <subtotalUSD>101.75</subtotalUSD>'; 
strTxt += '        <purchaser> ';
strTxt += '            <fname>Jean-Yves</fname>'; 
strTxt += '            <lname>Cases</lname> ';
strTxt += '            <company></company> ';
strTxt += '            <phone>0123456790</phone>'; 
strTxt += '            <email>jycases@intego.com</email>'; 
strTxt += '            <country>US</country> ';
strTxt += '            <region>CA</region> ';
strTxt += '            <address1>11 W Victoria St.</address1>'; 
strTxt += '            <address2>Suite 207A</address2> ';
strTxt += '            <city>Santa Barbara</city> ';
strTxt += '            <postal>93101</postal> ';
strTxt += '        </purchaser> ';
strTxt += '        <items> ';
strTxt += '            <item>'; 
strTxt += '                <product>WM2-2U</product>'; 
strTxt += '                <quantity>1</quantity> ';
strTxt += '                <subtotal>7.95</subtotal>'; 
strTxt += '                <priceTotalUSD>7.95</priceTotalUSD>'; 
strTxt += '                <licenses> ';
strTxt += '                    <license>'; 
strTxt += '                        <key>mac_license</key>'; 
strTxt += '                        <name></name> ';
strTxt += '                        <data>BCDH-VTTK-SBJO-SKKT-DLCV-VXCT</data>'; 
strTxt += '                    </license> ';
strTxt += '                </licenses> ';
strTxt += '                <files> ';
strTxt += '                    <file>'; 
strTxt += '                        <key>mac_file</key>'; 
strTxt += '                        <url>https://sites.fastspring.com/intego/order/dl/INT110612-5632-14398/DWTP</url>'; 
strTxt += '                    </file> ';
strTxt += '                </files> ';
strTxt += '            </item> ';
strTxt += '        </items> ';
strTxt += '        <survey> ';
strTxt += '            <surveyfield>'; 
strTxt += '                <display>Any comments?</display>'; 
strTxt += '                <key>Comments</key> ';
strTxt += '                <value>With VBX6</value>';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>How did you hear about Intego?</display>';
strTxt += '                <key>How did you hear about Intego?</key>';
strTxt += '                <value>None</value> ';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>Keep me informed about Intego updates and new releases.</display> ';
strTxt += '                <key>Keep me informed</key> ';
strTxt += '                <value>Yes</value> ';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>Other, please specify:</display>';
strTxt += '                <key>Other:specify</key>';
strTxt += '                <value></value>';
strTxt += '            </surveyfield>';
strTxt += '        </survey>';
strTxt += '    </order>';
strTxt += '</fsnotification>';

		nfInputItem.Content = strTxt;
		NA_NotificationHistory.nfOutputs nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(null);
		
		strTxt = '<fsnotification version="1.0" ></fsnotification>';
		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		strTxt = '<fsnotification version="1.0" ><order><purchaser></purchaser><items><item></item><item></item></items></order></fsnotification>';
		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		strTxt = '<fsnotification version="1.0" ><order></order></fsnotification>';
		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		strTxt = '<fsnotification version="1.0" ><return></return></fsnotification>';
		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		strTxt = '';
		
strTxt += '<fsnotification version="1.0" >'; 
strTxt += '    <return> ';
strTxt += '        <date>2011-06-12 15:18:43</date>'; 
strTxt += '        <reference>INT110612-5632-14398</reference>'; 
strTxt += '        <test>true</test> ';
strTxt += '        <ip>88.162.188.218</ip>'; 
strTxt += '        <referrer></referrer> ';
strTxt += '        <currency>EUR</currency>'; 
strTxt += '        <tax>8.92</tax> ';
strTxt += '        <total>110.67</total>'; 
strTxt += '        <subtotal>101.75</subtotal>'; 
strTxt += '        <subtotalUSD>101.75</subtotalUSD>'; 
strTxt += '  <type>return</type> ';
strTxt += '        <reason>Incorrect Order / Order Error - PLQ-251993 : Customer purchased wrong item. No longer needs software.</reason>'; 
strTxt += '        <purchaser> ';
strTxt += '            <fname>Jean-Yves</fname>'; 
strTxt += '            <lname>Cases</lname> ';
strTxt += '            <company></company> ';
strTxt += '            <phone>0123456790</phone>'; 
strTxt += '            <email>jycases@intego.com</email>'; 
strTxt += '            <country>US</country> ';
strTxt += '            <region>CA</region> ';
strTxt += '            <address1>11 W Victoria St.</address1>'; 
strTxt += '            <address2>Suite 207A</address2> ';
strTxt += '            <city>Santa Barbara</city> ';
strTxt += '            <postal>93101</postal> ';
strTxt += '        </purchaser> ';
strTxt += '        <items> ';
strTxt += '            <item> ';
strTxt += '                <product>WM2-2U</product> ';
strTxt += '                <quantity>1</quantity> ';
strTxt += '                <subtotal>7.95</subtotal>'; 
strTxt += '                <priceTotalUSD>7.95</priceTotalUSD> ';
strTxt += '                <licenses> ';
strTxt += '                    <license> ';
strTxt += '                        <key>mac_license</key> ';
strTxt += '                        <name></name> ';
strTxt += '                        <data>BCDH-VTTK-SBJO-SKKT-DLCV-VXCT</data> ';
strTxt += '                    </license> ';
strTxt += '                </licenses> ';
strTxt += '                <files> ';
strTxt += '                    <file> ';
strTxt += '                        <key>mac_file</key> ';
strTxt += '                        <url>https://sites.fastspring.com/intego/order/dl/INT110612-5632-14398/DWTP</url> ';
strTxt += '                    </file> ';
strTxt += '                </files> ';
strTxt += '            </item> ';
strTxt += '        </items> ';
strTxt += '    </return> ';
strTxt += '</fsnotification>';
		
		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
		
		
		strTxt = '';
strTxt += '<fsnotification version="1.0" >'; 
strTxt += '    <order> ';
strTxt += '        <date>2011-06-12 15:18:43</date>'; 
strTxt += '        <reference>INT110612-5632-14398</reference>'; 
strTxt += '        <test>true</test> ';
strTxt += '        <ip>88.162.188.218</ip>'; 
strTxt += '        <referrer></referrer> ';
strTxt += '        <currency>EUR</currency>'; 
strTxt += '        <tax>8.92</tax> ';
strTxt += '        <total>110.67</total>'; 
strTxt += '        <subtotal>101.75</subtotal>'; 
strTxt += '        <subtotalUSD>101.75</subtotalUSD>'; 
strTxt += '        <purchaser> ';
strTxt += '            <fname>Jean-Yves</fname>'; 
strTxt += '            <lname>Cases</lname> ';
strTxt += '            <company></company> ';
strTxt += '            <phone>0123456790</phone>'; 
strTxt += '            <email>jycases@intego.com</email>'; 
strTxt += '            <country>US</country> ';
strTxt += '            <region>CA</region> ';
strTxt += '            <address1>11 W Victoria St.</address1>'; 
strTxt += '            <address2>Suite 207A</address2> ';
strTxt += '            <city>Santa Barbara</city> ';
strTxt += '            <postal>93101</postal> ';
strTxt += '        </purchaser> ';
strTxt += '        <items> ';
strTxt += '            <item>'; 
strTxt += '                <product>WM2-2U</product>'; 
strTxt += '                <quantity>1</quantity> ';
strTxt += '                <subtotal>7.95</subtotal>'; 
strTxt += '                <priceTotalUSD>7.95</priceTotalUSD>'; 
strTxt += '                <licenses> ';
strTxt += '                    <license>'; 
strTxt += '                        <key>win_license</key>'; 
strTxt += '                        <name></name> ';
strTxt += '                        <data>BCDH-VTTK-SBJO-SKKT-DLCV-VXCT</data>'; 
strTxt += '                    </license> ';
strTxt += '                </licenses> ';
strTxt += '                <files> ';
strTxt += '                    <file>'; 
strTxt += '                        <key>win_file</key>'; 
strTxt += '                        <url>https://sites.fastspring.com/intego/order/dl/INT110612-5632-14398/DWTP</url>'; 
strTxt += '                    </file> ';
strTxt += '                </files> ';
strTxt += '            </item> ';
strTxt += '        </items> ';
strTxt += '        <survey> ';
strTxt += '            <surveyfield>'; 
strTxt += '                <display>Any comments?</display>'; 
strTxt += '                <key>Comments</key> ';
strTxt += '                <value>With VBX6</value>';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>How did you hear about Intego?</display>';
strTxt += '                <key>How did you hear about Intego?</key>';
strTxt += '                <value>None</value> ';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>Keep me informed about Intego updates and new releases.</display> ';
strTxt += '                <key>Keep me informed</key> ';
strTxt += '                <value>Yes</value> ';
strTxt += '            </surveyfield> ';
strTxt += '            <surveyfield> ';
strTxt += '                <display>Other, please specify:</display>';
strTxt += '                <key>Other:specify</key>';
strTxt += '                <value></value>';
strTxt += '            </surveyfield>';
strTxt += '        </survey>';
strTxt += '    </order>';
strTxt += '</fsnotification>';

		nfInputItem.Content = strTxt;
		nfOutputItem = NA_NotificationHistory.HistoryNotificationRequest(nfInputItem);
	}
}